<!doctype html>

<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>&lt;lime-editor&gt; Demo</title>
    <script type="module" src="../dist/lime-editor.bundled.js"></script>
  </head>
  <body>
    <form action="">
      <label for="editor">Markdown Content</label>
      <lime-editor autosave-key="toaster" id="lime-editor">
        <textarea name="editor" id="editor"># Hello</textarea>
      </lime-editor>
      <input type="submit" value="Send" />
    </form>

    <script>
      const editorTextarea = document.getElementById("editor")
      const editorContent = new URL(document.location.href).searchParams.get("editor")
      setTimeout(() => editorTextarea.value = editorContent, 2000)
    </script>
  </body>
</html>
